import base
from imgaug import augmenters as iaa
import random


id = '1058'

aug = iaa.Scale({"width": random.randint(600,1024), "height": "keep-aspect-ratio"})
# aug = iaa.Crop(percent=(0.25,0,0,0),keep_size=False)    #剪切
# aug = iaa.Flipud(1)                                     #山下翻转
# aug = iaa.Fliplr(1)                                     #左右翻转
# aug = iaa.WithChannels(0, iaa.Add(50))                  #增量某个通道
# aug = iaa.Grayscale(alpha=0.5)                          #灰度
# aug = iaa.GaussianBlur(sigma=3)                         #高斯模糊
# aug = iaa.AverageBlur(k=20)                             #平均模糊
# aug = iaa.MedianBlur(k=21)                              #中值模糊  必须是奇数
# aug = iaa.Add(50)                                       #增量图片
# aug = iaa.AdditiveGaussianNoise(scale= 0.5*255)         #添加高斯噪点
# aug = iaa.Multiply(0.5)                                 #乘某个值
# aug = iaa.Dropout(p=0.2)                                #按照比例将点设置0
# aug = iaa.Invert(1)                                     #颜色翻转
# aug = iaa.ContrastNormalization(0.2)                    #对比度   0.2~2
# aug = iaa.Scale(0.5)                                    #放大缩小
# aug = iaa.Affine(rotate=90)                             #旋转90度

new_id = "test_test"
# base.augmenttation_handle(id,aug,new_id,False)

